package cn.itsource.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@Document(collection = "article")
@Accessors(chain = true)
public class Article {
    @Id
    private String _id;
    private Long id;
    private String articlePic;
    private String articleName;
    private String articleTag;
    private Integer articleType;
    private Integer articleState;
    private Integer topState;
    private Integer publishId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime = new Date();
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    private Integer articleReadCount = 0;
    private Integer articleStarNum = 0;
    private Integer articleCommentNum = 0;
    private String articleRemark;
    private String articleContent;
    //文章类型
    private ArticleType acType;
    //文章作者
    private Employee publishName;
    private String articleTypeName;
}
